package com.bjpowernode.util;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class NumberUtil {

    public static Double compute(Integer a, Integer b) {
        BigDecimal aBig =  new BigDecimal(a);
        BigDecimal bBig =  new BigDecimal(b);
        BigDecimal result = aBig.divide(bBig, 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100));
        return result.doubleValue();
    }

    public static void main(String[] args) {
        System.out.println(compute(61, 100));
    }
}
